<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户管理</title>
		<link href="<%=application.getContextPath()%>/nresources/ued/css/all-src.css" type="text/css" rel="stylesheet" />
		<%@include file="/WEB-INF/ibnms/common/easyui.jsp" %>
		<%@include file="/WEB-INF/ibnms/common/jqgrid.jsp"%>
		<%@ include file="/WEB-INF/ibnms/common/jsCommonVariables.jsp"%>
	</head>
<body>
<div class="form-wrapper">
	<div class="box-in">
        <table border="0" cellspacing="0" cellpadding="0" class="table-03">
         <tr>
       	<td class="monitor_bg1" height="13" align ="right" nowrap>
       		与我通讯过的用户ID或姓名:
        	<input  type="text" class="input-style1" name="msg.user"/>
        	<input type="button" class="btn-style02" id="btn-search" value="模糊查询" />
        </td>
 		</tr>
        </table>
    </div>
    <div class="title-style"><a class="fold-tip"></a></div>
	<div class="block02">
		<table id="gridTable">
		</table>
		<div id="gridPager">
		</div>
		<form name="theForm" >
		</form>
	</div>
</div>
<script type="text/javascript">
			$(function(){$("#gridTable").jqGrid({
					url: "loadMsgHisListQueryJson.do",
					datatype: "json",
					mtype: "POST",
					height: "100%",
					autowidth: true,
					colNames:['发送人', '接收人', '消息内容', '发送时间', '提示次数', '确认时间'],
					colModel:[
						{name:'SENDER',index:'SENDER',width:'50px'},
						{name:'RECEIVER',index:'RECEIVER',width:'50px'},
						{name:'MSG_CONTENT',index:'MSG_CONTENT'},
						{name:'SEND_TIME',index:'SEND_TIME',width:'60px'},
						{name:'DISPLAY_SUM',index:'DISPLAY_SUM',width:'30px',formatter: function(value){
							if (value==undefined){
								return "0";
							}else{
								return value;
							}
						}},
						{name:'READ_TIME',index:'READ_TIME',width:'60px'}
					],
					viewrecords: true,
					rowNum: 15,
					rowList: [10,15,30],
					jsonReader: {
						root: 'rows',
						page: 'page',
						total: 'total',
						records: 'records',
						repeatitems: false,
						subgrid: {
					        root: 'rows',
							page: 'page',
							total: 'total',
							records: 'records',
							repeatitems: false
					    }      
					},
					pager: "#gridPager",
					hidegrid: true,
					beforeRequest:function(){
						var postData = {};
						$(":input[name^='msg.']").each(function(){
							postData[$(this).attr("name")] = $(this).val();
						});
						$.extend($("#gridTable").getGridParam("postData"), postData);
					}
				});
				
			}); 
			
			$("#btn-search").click(function(){
				$("#gridTable").trigger("reloadGrid",[{page:1}]);
			});
			
		</script>
</body>
</html:html>            
